package me.leiusual.sharing.api.model.businesscondition

data class ProductOption(
    val id: Long,
    val productImageUrl: String,
    val productModelName: String,
    val coinAmount: Double,
    val pointCoins: Double,
    val accountTypeName: String,
    val sellingCount: Int,
    val minPurchaseAmount: Int,
    val maxAmount: Int,
    val independentFreight: Double,
    val referStoreId: Long,
    val referStoreName: String,
    val features: Any?,
    val selected: Boolean,
    val canModified: Boolean
) {

  var checked: Boolean? = null
    get() {
      if (field == null) {
        field = selected
      }
      return field
    }

  var amount: Int? = null
    get() {
      if (field == null) {
        field = minPurchaseAmount
      }
      return field
    }
}